﻿<UserControl x:Class="WpfDocumentPreviewer.PreviewerControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:winforms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
             xmlns:local="clr-namespace:WpfDocumentPreviewer"
           d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
<DockPanel>
            <DockPanel x:Name="dockPreviewer"  VerticalAlignment="Stretch" DockPanel.Dock="Top">
          
                <WindowsFormsHost Name="wfh1"  
                Width="{Binding ActualWidth, ElementName=dockPreviewer, Mode=OneWay}"  >
                 <local:PreviewHandlerHost x:Name="previewHandlerHost1" Dock="Fill"  />
                </WindowsFormsHost>

                <WebBrowser x:Name="wb1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Visibility="Collapsed" LoadCompleted="wb1_LoadCompleted" />

            </DockPanel>
        </DockPanel>          
    </Grid>
</UserControl>
